<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div title="" id="box">
        <p>innerHTML</p>
    </div>
    <a href='javascript:popUp("http://www.baidu.com/");'>javascript:百度</a>
    <br>
    <a onclick='popUp("http://www.baidu.com/");'>onclick百度</a>

    <script>
        let el=document.getElementById("box");
        let e = el.getAttribute('title');
        alert(e)
        el.setAttribute('title','这是一个div')
        alert(el.getAttribute('title'))

        function popUp(winURL){
            window.open(winURL,'popup','width=320，height=480')
        }
       function insertParagraph(text){
           var str= `<p>${text}</p>`
           document.write(str)
       }
       insertParagraph('我是p标签')
       function text(){
           console.log(document.getElementById('box').innerHTML);
       }
       text()
    </script>
</body>

</html>